package com.bw.contrller;

import com.bw.bean.Cde;
import com.bw.bean.Vo;
import com.bw.service.VoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Author: lhy
 * @Date: 2025/3/18 08:18
 * @Description:
 **/
@RestController
public class VoContrller {
    @Autowired
    VoService voService;
    @RequestMapping("List1")
    public Map getList1(){
        List list=new ArrayList();
        list.add("店铺名称");
        list.add("下单金额");
        list.add("下单次数");
        list.add("下单人数");
        list.add("实收金额");
        list.add("退款成功金额");
        List<Cde> list1 =voService.getList1();
        return SugarUtil.getTablePlayData(list,list1);
    }
    @RequestMapping("List2")
    public Map getList2(){
        List<Vo> list=voService.getList2();
        return SugarUtil.getBarData(list);
    }
    @RequestMapping("List3")
    public Map getList3(){
        List<Vo> list=voService.getList3();
        return SugarUtil.getLineData(list);
    }
}
